//
//  YXStatusBottonView.swift
//  微博YX
//
//  Created by apple on 15/11/28.
//  Copyright © 2015年 lyx. All rights reserved.
//

import UIKit

class YXStatusBottonView: UIView {

    override init(frame: CGRect) {
        super.init(frame: frame)
        
        prepareUI()
        
    }
    //准备UI
    func prepareUI(){
        backgroundColor = UIColor(white: 0.98, alpha: 1)
        //        添加子控件
        addSubview(repostsButton)
        addSubview(commentsButton)
        addSubview(attitudesButton)
        //        添加约束
        self.ff_HorizontalTile([repostsButton,commentsButton,attitudesButton], insets: UIEdgeInsetsZero)
    
    }
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    //    转发
    private lazy var repostsButton: UIButton = {
        let btn = UIButton()
        btn.setImage(UIImage(named: "timeline_icon_retweet"), forState: UIControlState.Normal)
        btn.setTitle("转发", forState: UIControlState.Normal)
        btn.setTitleColor(UIColor.grayColor(), forState: UIControlState.Normal)
        btn.titleLabel?.font = UIFont.systemFontOfSize(14)
        return btn
    }()
    
    //    评论
    private lazy var commentsButton: UIButton = {
        let btn = UIButton()
        btn.setImage(UIImage(named: "timeline_icon_comment"), forState: UIControlState.Normal)
        btn.setTitle("评论", forState: UIControlState.Normal)
        btn.setTitleColor(UIColor.grayColor(), forState: UIControlState.Normal)
        btn.titleLabel?.font = UIFont.systemFontOfSize(14)
        return btn
        }()
    
    //    赞
    private lazy var attitudesButton: UIButton = {
        let btn = UIButton()
        btn.setImage(UIImage(named: "timeline_icon_unlike"), forState: UIControlState.Normal)
        btn.setTitle("赞", forState: UIControlState.Normal)
        btn.setTitleColor(UIColor.grayColor(), forState: UIControlState.Normal)
        btn.titleLabel?.font = UIFont.systemFontOfSize(14)
        return btn
        }()

}
